package com.user.dao.dish;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @Author : Yu
 * @Date 2023/12/29 11:26
 */
@Data
public class CreatOrUpdateDish {
    private Integer restaurantId;
    private Integer id;
    @NotNull(message = "图片不能为空")
    private String image;
    @NotNull(message = "名称不能为空")
    private String name;
    @Min(value = 0, message = "价格不能小于0")
    @NotNull(message = "价格不能为空")
    private BigDecimal price;
    @Range(min = 1, max = 7, message = "类只能是1-7")
    @NotNull(message = "分类不能为空")
    private Integer classify;
    @Min(value = 0, message = "数量不能小于0")
    @NotNull(message = "数量不能为空")
    private Integer number;

}
